package com.example.tms.mapper;


import com.example.tms.bean.OilfillView;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Repository
public interface OilfillVMapper extends JpaRepository<OilfillView,String>, JpaSpecificationExecutor<OilfillView> {




    //查询
    @Query(value = "select * from oilfill where ykh =?1 ", nativeQuery = true)
    List<OilfillView> findByYkh(String ykh);



    //计算累计充油金额
//    @Query(value = "select sum(sjcyje) FROM oilfill where ykh = ?1 ", nativeQuery = true)
//    String sumSjcyje(String ykh);


}
